//***************************************************************************
//*
//*	File:			dswl_genericproject.h
//*	Description:	Wrapper for IGenericProject interface
//*
//***************************************************************************
//*
//*	Note:			This source code is provided "as is" meaning that you may 
//*					use it at your own risk. 
//*					You are free to use it in any way you like.
//*
//***************************************************************************
//*
//*	History:		
//*
//*	-------------------------------------------------------------------------
//*	2003/07/27	|	Initial release									|	rk
//*	-------------------------------------------------------------------------
//*
//***************************************************************************

//
//-------------------------------------------------------------- PREPROCESSOR 
//

#ifndef			_DSWL_GENERICPROJECT_H_INCLUDED
#define			_DSWL_GENERICPROJECT_H_INCLUDED

#if				_MSC_VER > 1000
#pragma once
#ifdef			__SWITCH_SHOW_HEADER
#pragma message ("-- dswl_genericproject.h\n")
#endif
#ifdef			__SWITCH_SHOW_HEADER_TREE
#pragma message ("-- "__FILE__"\n")
#endif
#endif 

#ifdef			_DSWL_SWITCH_USE_AUTOCAST
#ifdef			_DSWL_SWITCH_USE_UNSAFE_AUTOCAST
#pragma	message ( "-- dswl_genericproject.h \t Warning: Generating auto-cast operator: CIGenericProject::operator IGenericProject* () const" )
#else
#pragma	message ( "-- dswl_genericproject.h \t Warning: Generating auto-cast operator: CIGenericProject::operator       IGenericProject* ()" )
#pragma	message ( "-- dswl_genericproject.h \t Warning: Generating auto-cast operator: CIGenericProject::operator const IGenericProject* () const" )
#endif
#endif

//
//-------------------------------------------------------------- DEPENDENCIES
//

#include		<afxtempl.h>

//
//------------------------------------------------------ FORWARD DECLARATIONS
//

class			CIApplication	;

//
//--------------------------------------------------------- CLASS DECLARATION
//

//***************************************************************************
//**	@DOC		CLASS CIGenericProject
//***************************************************************************
//*		@CLASS		Wrapper for IGenericProject interface
//***************************************************************************
class _DSWL_EXT_CLASS CIGenericProject  
{
	typedef CArray< CString, CString& > CFilePathArray;

	//																								
	//-----------------------------------------------------------------------						
	//***************************     ATTRIBS     ***************************						
	//-----------------------------------------------------------------------						
	//																								
private:																											// @ACCESS	Private Attributes	
			CComPtr< IGenericProject >	m_pIGenericProject	;														// @CMEMBER	Smart pointer to the actual generic project interface
																									
	//																												
	//-----------------------------------------------------------------------										
	//*************************     PROPERTIES     **************************					
	//-----------------------------------------------------------------------										
	//																												
public:																												// @ACCESS	Public Property Methods
			CIApplication				GetApplication		( void )									const	;	// @CMEMBER	Determines the application this project belongs to
			CString						GetFullName			( void )									const	;	// @CMEMBER	Returns the project's full name
			CString						GetName				( void )									const	;	// @CMEMBER	Returns the project's name
																										
	//																												
	//-----------------------------------------------------------------------										
	//*************************     INFORMATION     *************************					
	//-----------------------------------------------------------------------										
	//																												
public:																												// @ACCESS	Public Information Methods
			BOOL						IsNull				( void )									const	;	// @CMEMBER	Determines whether the internal pointer is <t NULL>
			BOOL						IsValid				( void )									const	;	// @CMEMBER	Determines whether the internal pointer differs from <t NULL>
										
	//																											
	//-----------------------------------------------------------------------									
	//*************************     EXTENSIONS     **************************
	//-----------------------------------------------------------------------									
	//																											
public:																												// @ACCESS	Public Extension Methods
			long						GetSourceFilePaths	(		CFilePathArray&		a_arrPaths	)	const	;	// @CMEMBER	Determines the paths of all source files contained in this project

	//																									
	//-----------------------------------------------------------------------							
	//**************************     OPERATORS     **************************							
	//-----------------------------------------------------------------------							
	//																									
public:																												// @ACCESS	Public Operators
			bool						operator	==		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	!=		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	<=		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	>=		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	<		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
			bool						operator	>		( const CIGenericProject&	a_Other		)	const	;	// @CMEMBER	Comparison operator
																									
			CIGenericProject&			operator	=		(		IGenericProject*	a_pIOther	)			;	// @CMEMBER	Copy operator
																								
			IGenericProject*			operator	*		( void )											;	// @CMEMBER	Dereference operator
	const	IGenericProject*			operator	*		( void )									const	;	// @CMEMBER	Dereference operator
																										
			IGenericProject*			operator	->		( void )											;	// @CMEMBER	Member access operator
	const	IGenericProject*			operator	->		( void )									const	;	// @CMEMBER	Member access operator
										
	#ifdef	_DSWL_SWITCH_USE_AUTOCAST
	#ifdef	_DSWL_SWITCH_USE_UNSAFE_AUTOCAST
										operator			IGenericProject*	( void )				const	;	// @CMEMBER	TypeCast operator
	#else								
										operator			IGenericProject*	( void )						;	// @CMEMBER	TypeCast operator
										operator	const	IGenericProject*	( void )				const	;	// @CMEMBER	TypeCast operator
	#endif
	#endif

	//																						
	//-----------------------------------------------------------------------				
	//***********************     CON/DESTRUCTION     ***********************				
	//-----------------------------------------------------------------------				
	//																						
public:																												// @ACCESS	Public Con-/Destruction Methods	
			 CIGenericProject( IGenericProject* a_pIGenericProject = NULL );										// @CMEMBER	Default constructor
	virtual ~CIGenericProject();																					// @CMEMBER	Default destructor
};
//***************************************************************************
//**	@END
//***************************************************************************

#endif		// _DSWL_GENERICPROJECT_H_INCLUDED
